#!/bin/bash

YT=`date -d "1 days ago" +%Y%m%d`
WD=`date -d "8 days ago" +%Y%m%d`
TD=`date +%Y%m%d`

/usr/local/hive/bin/hive \
--hivevar yesterday="$YT" \
--hivevar today="$TD" \
--hivevar week="WD" \
-f s04_02_insert_data.hql